﻿@model Proggy.Web.Cms.Core.ViewModels.AddDragAndDropPartViewModel
@{
        //Html.AddToBackEndContent("~/Areas/ProggyCore/Content/Css/DragAndDropEditor.css", BackEndContentType.Stylesheet);
        //Html.RenderBackEndContentInLightboxPartial();   
}
<script type="text/javascript">
    window.DAND_CONFIGURE_STATUS = "add";
</script>
<h3 class="proggy-lb-title">
    Choose part</h3>
<div class="dand-partdata-header">
    <h4>
        Select a part to add</h4>
</div>
<div class="dand-partdata dand-partdata-add">
    @foreach (var part in Model.AllowedParts)
    {
        <div class="dand-partselection">
            @using (Html.BeginRouteForm("", new { area = "ProggyCore", controller = "DragAndDrop", action = "Configure" }, FormMethod.Get, new { @class = "proggy-lb-form-within" }))
            { 
                <h4>@part.FriendlyName</h4>
                <p class="italic">@part.Description</p>
                <input type="hidden" value="@part.Name" name="part" />
                <input type="hidden" value="@(Convert.ToInt32(Request["nodeId"]))" name="nodeId" />
                <input type="submit" class="proggy-button-go" value="Add" />
            }
        </div>
    }
    @Html.Clear()
</div>
